<html>
<head><meta charset="utf-8"><title>Return value optimizations · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Return.20value.20optimizations.html">Return value optimizations</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203697449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Return%20value%20optimizations/near/203697449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Return.20value.20optimizations.html#203697449">(Jul 13 2020 at 10:09)</a>:</h4>
<p>Is there any chance mir-opts can help with <a href="https://github.com/rust-lang/rust/issues/74267">https://github.com/rust-lang/rust/issues/74267</a> ?</p>



<a name="203698048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Return%20value%20optimizations/near/203698048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Return.20value.20optimizations.html#203698048">(Jul 13 2020 at 10:17)</a>:</h4>
<p>I tried dest prop yesterday but it did nothing, presumably we need inlining</p>



<a name="203698187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Return%20value%20optimizations/near/203698187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Return.20value.20optimizations.html#203698187">(Jul 13 2020 at 10:19)</a>:</h4>
<p>yeah likely this requires <code>assume_init</code> to be inlined fairly early in the optimization chain</p>



<a name="203698611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Return%20value%20optimizations/near/203698611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Return.20value.20optimizations.html#203698611">(Jul 13 2020 at 10:25)</a>:</h4>
<p>we can move the inliner earlier. There may be some regressions with inlining function calls in dead code though</p>



<a name="203698631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Return%20value%20optimizations/near/203698631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Return.20value.20optimizations.html#203698631">(Jul 13 2020 at 10:25)</a>:</h4>
<p>Ideally we'd do another deaggregation run after inlining</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>